<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%-- 	<%
//request对象的使用
String str="xiaoming";
request.setAttribute("strName", str);
%> --%>

	<%
	//设置request对象的编码格式和客户端页面保持一致（解决中文乱码）
	request.setCharacterEncoding("utf-8");
//前表单控件的name属性的值
out.print("表单中Name值为："+request.getParameter("txtName"));
/* out.write(request.getParameter("txtPsw")); */
//获取多元素控件
String [] strVals = request.getParameterValues("chHobby");
for(String str : strVals){
	out.print(str+"</br>");
}
%>
</body>
</html>